package com.xxxx.springbootsecurity02.controller;

import com.xxxx.springbootsecurity02.pojo.SysUser;
import com.xxxx.springbootsecurity02.service.UserService;
import com.xxxx.springbootsecurity02.util.ResultJSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/info")
    public String info() {
        return "info...";
    }

    @PostMapping("/login")
    public ResultJSON login(@RequestBody SysUser sysUser) {
        return userService.login(sysUser);
    }
}
